<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
// 
//  imin.php
//  phpweb
//  
//  Created by WillLee on 2011-07-25.
//  Copyright 2011 lishuzu. All rights reserved.
// 

class Imin extends CI_Controller {
	function __construct()
	{
		parent::__construct();
 		$this->load->model('common/security_model');
		if($this->security_model->isLogin() === FALSE){
			showmessage('请登录', 'login', 2);
		}
		
		$this->load->model('user_model');
		
		$this->user = $this->session->userdata('user') ? $this->session->userdata('user') : '';
	}
	
	public function index()
	{
		$data = array();
		$data['userinfo'] = $this->user_model->getuser('uid', $this->user['uid']);
		$data['self'] = $this->security_model->checkself($this->user['uid']);
		$this->load->template('imin_tpl',$data);
	}
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */